package com.echartsdata.Entityimp;

import com.echartsdata.Entity.User;
import com.echartsdata.Mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 查询用户
 */
@Component
public class Userimp {
    //查询用户
    @Resource
    private UserMapper userMapper;
    public User get_user(String username){
        return userMapper.get_user(username);
    }


    // 用户注册方法
    public void registerUser(String username,String password) {
         userMapper.save(username, password);
    }
}
